for arg in "$@"
do
    if isOption "${arg}" ; then
        check_options "${lastarg}"
        case "${arg}" in
                 -debug) debugFlag=1; set -xv ;;
               -h|-help) print_version; usage 0 ;;
            -v|-version) print_version 0 ;;

                 -seri*) seriesFlag=1 ;;
                 -labe*) labelFlag=1 ;;
               -reuseV*) reuseViewFlag=1 ;;
               -reuseW*) reuseWorkFlag=1 ;;
               -reuseD*) reuseDbFlag=1 ;;
               -reuseS*) reuseSchemaFlag=1 ;;
                 -test*) testFlag=1 ;;
               -suiteN*) suiteNFlag=1 ;;
               -secure*) secureFlag=1 ;;
             -nosecure*) secureFlag=0 ;;
                  -lrg*) lrgFlag=1 ;;
                  -srg*) srgFlag=1 ;;
                -noset*) setupFlag=1 ;;
                -noema*) noEmailFlag=1 ;;
                -nowat*) noWatchFlag=1 ;;
                -newvi*) newViewFlag=1 ;;
                 -view*) viewNameFlag=1 ;;
                -uploa*) uploadFlag=1 ;;
               -emailS*) emailSubjectFlag=1 ;;
               -emailT*) emailToFlag=1 ;;
               -emailF*) emailFromFlag=1 ;;
                -devel*) develFlag=1 ;;
                -repos*) repositoryFlag=1 ;;
                 -tolo*) tolocFlag=1 ;;
                 -tofi*) tofileFlag=1 ;;
                  -sto*) stopFlag=1 ;;
          -skipcleanup*) skipCleanup=1 ;;
                 -farm*) farmFlag=1 ;;
                  -txn*) txnFlag=1; reopenFlag=0 ;;
               -config*) configFlag=1 ;;
               -publis*) publishFlag=1 ;;
               -newtxn*) newtxnFlag=1; reopenFlag=0 ;;
               -reopen*) reopentxnFlag=1; txnFlag=0; newtxnFlag=0 ;;
                 -diag*) diagFlag=1 ;;
      -refres*|-setupv*) refreshFlag=1 ;;
            -setup_jdev) jdevFlag=1 ;;
                 -node*) nodeFlag=1 ;;
            -use_env_f*) useenvfileFlag=1 ;;

                -*) $ECHO "\nERROR: Unrecognized option: '${arg}'"; usage 1 ;;
        esac
        lastarg="${arg}"
        continue
    fi
    if [ 1 -eq ${seriesFlag} ]; then
        SERIES="${arg}"
        $PRINTF "\n${BLD}SERIES${NRM} : ${SERIES}\n"
        seriesFlag=-1
    elif [ 1 -eq ${labelFlag} ]; then
        LABEL="${arg}"
        $PRINTF "\n${BLD}LABEL${NRM} : ${LABEL}\n"
        labelFlag=-1
    elif [ 1 -eq ${useenvfileFlag} ]; then
        USE_ENV_FILE="${arg}"; export USE_ENV_FILE
        $PRINTF "\n${BLD}Using env_file${NRM} : ${USE_ENV_FILE}\n"
        useenvfileFlag=-1
    elif [ 1 -eq ${testFlag} ]; then
        DIRECTIVES="${arg}"
        TESTFILE="${arg}"; export TESTFILE
        $PRINTF "\nProcessing test : ${DIRECTIVES}\n"
        testFlag=-1
    elif [ 1 -eq ${suiteNFlag} ]; then
        SUITENAME="${arg}"; export SUITENAME
        $PRINTF "\nPassing suite : ${SUITENAME}\n"
        suiteNFlag=-1
    elif [ 1 -eq ${viewNameFlag} ]; then
        VIEWNAME="${arg}"
        $PRINTF "\nView name is : ${VIEWNAME}\n"
        isNewview=1
        viewNameFlag=-1
    elif [ 1 -eq ${newViewFlag} ]; then
        DIRECTIVES=$( $ECHO "${HOME}/${arg}" )
        TESTFILE=$( $ECHO "${arg}" | $SED -e 's/_[0-9][0-9]*$//' )
        $PRINTF "\nSetting up new view using : ${DIRECTIVES}\n"
        newViewFlag=-1
    elif [ 1 -eq ${emailSubjectFlag} ]; then
        EMAIL_SUBJECT="${arg}"; export EMAIL_SUBJECT
        emailSubjectFlag=-1
    elif [ 1 -eq ${txnFlag} ]; then
        _TXN="${arg}"
        txnFlag=-1
    elif [ 1 -eq ${newtxnFlag} ]; then
        _NEWTXN="${arg}"
        newtxnFlag=-1
    elif [ 1 -eq ${reopentxnFlag} ]; then
        _REOPENTXN="${arg}"
        reopentxnFlag=-1
    elif [ 1 -eq ${configFlag} ]; then
        TRIAGE_CONFIG="${arg}"; export TRIAGE_CONFIG
        $PRINTF "\nConfiguration: ${TRIAGE_CONFIG}\n"
        configFlag=-1
    elif [ 1 -eq ${emailToFlag} ]; then
        EMAIL_TO="${arg}"; export EMAIL_TO
        emailToFlag=-1
    elif [ 1 -eq ${emailFromFlag} ]; then
        EMAIL_FROM="${arg}"; export EMAIL_FROM
        emailFromFlag=-1
    elif [ 1 -eq ${tolocFlag} ]; then
        FILESONLINE="${arg}"; export FILESONLINE
        $PRINTF "\nFolder is: ${FILESONLINE}\n"
        tolocFlag=-1
    elif [ 1 -eq ${tofileFlag} ]; then
        DEFAULT_UPLOAD_REPORT_NAME="${arg}"; export DEFAULT_UPLOAD_REPORT_NAME
        $PRINTF "\nTo File: ${DEFAULT_UPLOAD_REPORT_NAME}\n"
        tofileFlag=-1
    elif [ 1 -eq ${nodeFlag} ]; then
        NODELIST="${arg}"
        $PRINTF "\nNodes: ${NODELIST}\n"
        nodeFlag=-1
    else
        $PRINTF "\nERROR: Unrecognized parameter: '${arg}'\n"; usage 1
    fi
done
